Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select correct tenant during query federation #5943

Merged

Conversation

CharlieTLe
Copy link
Member

What this PR does:
We are creating a job which has the tenant name for each tenant to
query, but we use the incorrect index in the ids slice that contains
the list of tenants. This causes the querier to select results for the
first tenant in the list of tenants to match with instead of the actual
tenant the querier was intended for.

I updated the existing tests to check the labels of the results as well
instead of only relying on the number of series found.

Which issue(s) this PR fixes:
Fixes #5941

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

We are creating a job which has the tenant name for each tenant to
query, but we use the incorrect index in the `ids` slice that contains
the list of tenants. This causes the querier to select results for the
first tenant in the list of tenants to match with instead of the actual
tenant the querier was intended for.

I updated the existing tests to check the labels of the results as well
instead of only relying on the number of series found.

Fixes cortexproject#5941

Signed-off-by: Charlie Le <[email protected]>
@alanprot
Copy link
Member

Nice catch! Thanks!

@yeya24 can you help to review when u have sometime?

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix makes sense to me. Good catch!

@yeya24 yeya24 enabled auto-merge May 11, 2024 05:21
@yeya24 yeya24 merged commit 326c71c into cortexproject:master May 11, 2024
16 checks passed
@alanprot
Copy link
Member

Should we cherry pick to the release branch?

@yeya24
Copy link
Contributor

yeya24 commented May 13, 2024

We should. Let's prepare 1.17.1

@yeya24 yeya24 mentioned this pull request May 20, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query Federation Incorrectly Returns Series for Wrong Tenant with __tenant_id__ Label Matcher
3 participants